package com.project.service.impl;

import com.project.bean.CutPageBean;
import com.project.bean.StudentBean;
import com.project.dao.IStudentDao;
import com.project.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements IStudentService {
    @Autowired
    private IStudentDao studentDao;

    @Override
    public CutPageBean<StudentBean> findByItem(Integer pageNO, String name, String className, String roomAddress) {
        return studentDao.findByItem(pageNO, name, className, roomAddress);
    }

    @Override
    public void del(int id) {
        studentDao.del(id);
    }

    @Override
    public void add(StudentBean student) {
        studentDao.add(student);
    }

    @Override
    public void update(int studentId, int roomId) {
        studentDao.update(studentId, roomId);
    }

    @Override
    public StudentBean findById(int id) {
        return studentDao.findById(id);
    }
}
